// JPEG.cpp : Defines the initialization routines for the DLL. // #include "stdafx.h" #include "JPEG.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CJPEGApp BEGIN_MESSAGE_MAP(CJPEGApp, CWinApp) //{{AFX_MSG_MAP(CJPEGApp) // NOTE - the ClassWizard will add and remove mapping macros here. // DO NOT EDIT what you see in these blocks of generated code! //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CJPEGApp construction // DUAL_SUPPORT_START // Note: if you make a custom filter by copying this file, make sure to replace the following // GUID with a new GUID that matches the uuid statement in the library declaration in the // .ODL file. This is the GUID that OLE will use to register and use the automation object's // type library. // {28696022-B7E6-11D0-9B3B-444553540000} static const GUID LIBID_JPEG = { 0x28696022L, 0xb7e6, 0x11d0, 0x9b, 0x3b, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0 }; // DUAL_SUPPORT_END CJPEGApp::CJPEGApp() { } ///////////////////////////////////////////////////////////////////////////// // The one and only CJPEGApp object CJPEGApp theApp; ///////////////////////////////////////////////////////////////////////////// // CJPEGApp initialization BOOL CJPEGApp::InitInstance() { // Register all OLE server (factories) as running. This enables the // OLE libraries to create objects from other applications. COleObjectFactory::RegisterAll(); // DUAL_SUPPORT_START // make sure the type library is registerd. Otherwise dual interface won't work! // note that we are embedding type library as a resource in this DLL. AfxOleRegisterTypeLib(AfxGetInstanceHandle(), LIBID_JPEG); // DUAL_SUPPORT_END return TRUE; } ///////////////////////////////////////////////////////////////////////////// // Special entry points required for inproc servers STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); return AfxDllGetClassObject(rclsid, riid, ppv); } STDAPI DllCanUnloadNow(void) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); return AfxDllCanUnloadNow(); } // by exporting DllRegisterServer, you can use regsvr.exe STDAPI DllRegisterServer(void) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); COleObjectFactory::UpdateRegistryAll(); return S_OK; }
SDK Top API Reference TurboCAD Home Page TurboCAD Programming Forums